
const state = {
    count:1
}

const mutations = {
    increment(state) {
        state.count++
    },
    decrement(state){
        state.count--
    }
}
 const actions = {
     increment:({commit}) =>{
         commit("increment")//对应mutations里面的increment
     },
     decrement:({commit}) =>{
        commit("decrement")//对应mutations里面的decrement
    }
 }
 export default {
    namespaced:true,
    state,
    mutations,
    actions
 }